<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Guide</title>
    #required_css
    <link rel="stylesheet" href="$!basePath/app/docs.css">
</head>
<body>
<div class="container bs-docs-container">
    <div class="row">
        <div class="col-md-12" role="main">
            <div class="bs-docs-section">
                <h1 class="page-header">百度ECharts</h1>
                <p class="lead">基于<code><a href="http://echarts.baidu.com" target="_blank">百度ECharts</a></code>实现，需引入<code>/framework/js/view/charts.js</code></p>

                <h2>基本实例</h2>
                <div class="bs-example">
                    <div id="main" style="width: 600px;height:400px;"></div>
                </div>
                <figure class="highlight">
                    <pre class="brush: javascript">
                        &lt;div id="main" style="width: 600px;height:400px;"&gt;&lt;/div&gt;

                        ns.view.charts.echarts.init("#main", {
                            title: {
                                text: 'ECharts 入门示例'
                            },
                            tooltip: {},
                            legend: {
                                data:['销量']
                            },
                            xAxis: {
                                data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
                            },
                            yAxis: {},
                            series: [{
                                name: '销量',
                                type: 'bar',
                                data: [5, 20, 36, 10, 10, 20]
                            }]
                        });
                    </pre>
                </figure>
            </div>
        </div>
    </div>
</div>
</body>
#required_js
<script type="text/javascript" src="$!basePath/app/docs.js"></script>
<script>
    ns.requireJS("/framework/js/view/charts.js");
    ns.ready(function(){
        ns.view.charts.echarts.init("#main", {
            title: {
                text: 'ECharts 入门示例'
            },
            tooltip: {},
            legend: {
                data:['销量']
            },
            xAxis: {
                data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
            },
            yAxis: {},
            series: [{
                name: '销量',
                type: 'bar',
                data: [5, 20, 36, 10, 10, 20]
            }]
        });
    });
</script>
</html>